using FluentNHibernate.Mapping;
using Webshop20.Domain.Shared.Payment.Core;

namespace Webshop20.Infrastructure.Persistence.NH.Mappings
{
    public class IPaymentMapping : ClassMap<IPayment>
    {
        public IPaymentMapping()
        {
            JoinedSubClass<DirectDebit>("DirectDebitId", sub=>
                                                             {
                                                                 sub.Map(x=>x.AccountNumber);
                                                                 sub.Map(x => x.AccountNumber);
                                                                 sub.Map(x => x.BankCode);
                                                                 sub.Map(x => x.BankName);
                                                             });

            JoinedSubClass<CreditCard>("CreditCardId", sub =>
                                                           {
                                                               sub.Map(x => x.ExpirationMonth);
                                                               sub.Map(x => x.ExpirationYear);
                                                               sub.Map(x => x.Number);
                                                               sub.Map(x => x.Owner);
                                                           });

            JoinedSubClass<Prepayment>("PrepaymentId", sub => {});
       
        }


    }
}